package Chatter::API::Schema::Result::Account;

# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE

use strict;
use warnings;

use Moose;
use MooseX::NonMoose;
use namespace::autoclean;
extends 'DBIx::Class::Core';

# disable for Catalyst::View::JSON
#__PACKAGE__->load_components("InflateColumn::DateTime");

__PACKAGE__->table("account");

__PACKAGE__->add_columns(
  "accountId",
  { data_type => "varchar", is_nullable => 0, size => 100 },
  "name",
  { data_type => "varchar", is_nullable => 1, size => 50 },
  "followers",
  { data_type => "integer", is_nullable => 1 },
  "followings",
  { data_type => "integer", is_nullable => 1 },
  "email",
  { data_type => "varchar", is_nullable => 0, size => 100 },
  "url",
  { data_type => "varchar", is_nullable => 0, size => 100 },
  "oldest",
  {
    data_type     => "timestamp",
    is_nullable   => 1,
    datetime_undef_if_invalid => 1,
  },
  "latest",
  {
    data_type     => "timestamp",
    is_nullable   => 1,
    datetime_undef_if_invalid => 1,
  },
  "count",
  { data_type => "integer", is_nullable => 1 },
);
__PACKAGE__->set_primary_key("accountId");

__PACKAGE__->has_many(
  "replies",
  "Chatter::API::Schema::Result::Reply",
  { "foreign.accountId" => "self.accountId" },
  { cascade_copy => 0, cascade_delete => 0 },
);

__PACKAGE__->has_many(
  "threads",
  "Chatter::API::Schema::Result::Thread",
  { "foreign.accountId" => "self.accountId" },
  { cascade_copy => 0, cascade_delete => 0 },
);

__PACKAGE__->meta->make_immutable;
1;
